package InsuranceBuilder;

public class InsuranceContract {
	
	private String contractId;
	
	private String personName;
	
	private String companyName;
	
	private long beginDate;
	
	private long endDate;
	
	private String otherData;
	
	public InsuranceContract(ConcreteBuilder builder) {
		this.contractId = builder.contractId;
		this.personName = builder.personName;
		this.companyName = builder.companyName;
		this.beginDate = builder.beginDate;
		this.endDate = builder.endDate;
		this.otherData = builder.otherData;
	}
	
	public void someOperation() {
		System.out.println("当前正在操作的保险合同编号为【" + this.contractId + "】");
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getPersonName() {
		return personName;
	}

	public void setPersonName(String personName) {
		this.personName = personName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public long getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(long beginDate) {
		this.beginDate = beginDate;
	}

	public long getEndDate() {
		return endDate;
	}

	public void setEndDate(long endDate) {
		this.endDate = endDate;
	}

	public String getOtherData() {
		return otherData;
	}

	public void setOtherData(String otherData) {
		this.otherData = otherData;
	}

	@Override
	public String toString() {
		return "InsuranceContract [contractId=" + contractId + ", personName=" + personName + ", companyName="
				+ companyName + ", beginDate=" + beginDate + ", endDate=" + endDate + ", otherData=" + otherData + "]";
	}
	
}
